home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ Win9x DOS TEMP.xpl < prev    next >
Text File  |  2001-09-01  |  2KB  |  80 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="4"
  3. "COUNT"="1"
  4. "UIPATH 1"="System\File System\Folders\Temporary"
  5. "NAME"="Windows 95/98 TEMP folder"
  6. "OSVERSION"="10100"
  7. "VERSION"="1.04"
  8. "LANGUAGE"="VBScript"
  9. "TEXT 1"="TEMP folder"
  10. "DESCRIPTION 1"="Some programs need an temporary location to store files that are "in progress" (normally C:\TEMP)."
  11. "DESCRIPTION 2"="Use this plug-in to select this location."
  12. "AUTHOR"="Xteq Systems"
  13. "CONTACTURL"="http://www.xteq.com"
  14. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  15. "COMMENT 1"="Thanks to AXCEL216 for this tip."
  16.  
  17.  
  18. 'Declaration of some constants
  19. sF="C:\AUTOEXEC.BAT"
  20. sV1="SET TEMP="
  21. sV2="SET TMP="
  22.  
  23. 'Called when the Plugin is started
  24. Sub Plugin_Initialize
  25.  Call FileSetAttribute(sF,"R-")
  26.  Call FileSetAttribute(sF,"H-")
  27.  
  28.  TxtOpen(sF)
  29.  
  30.  i=TxtFindLine(sV1,false) 'search for first (TEMP), ignoring case
  31.  if i>0 then
  32.     s=TxtGetLine(i)
  33.     'strip out the part after the "="
  34.     i=InStr(s,"=")      'find where "=" appears
  35.     s=Right(s,len(s)-i) 'extract the part after the "="
  36.  
  37.     s1=s
  38.  end if     
  39.  
  40.  i=TxtFindLine(sV2,false) 'search for second (TMP), ignoring case
  41.  if i>0 then
  42.     s=TxtGetLine(i)
  43.     'strip out the part after the "="
  44.     i=InStr(s,"=")      'find where "=" appears
  45.     s=Right(s,len(s)-i) 'extract the part after the "="
  46.  
  47.     s2=s
  48.  end if     
  49.  
  50.  if len(s1)=0 then
  51.     Call SetUIElement(1,s2)
  52.  else
  53.     Call SetUIElement(1,s1)
  54.  end if
  55. End Sub
  56.  
  57. 'Called when the Plugin should validate the Data the user has entered
  58. Sub Plugin_CheckData(ElementIndex)
  59. End Sub
  60.  
  61. 'Called when the Plugin should apply the changes
  62. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  63.  s=GetUIElement(1)
  64.  
  65.  i=TxtFindLine(sV1,false) 'search for second prompt, ignoring case
  66.  Call TxtSetLine(i,sV1 & s) 'write to file
  67.  
  68.  i=TxtFindLine(sV2,false) 'search for second prompt, ignoring case
  69.  Call TxtSetLine(i,sV2 & s) 'write to file
  70.  
  71.  Call FileBackup(sF) 'backup file
  72.  Call TxtSave() 'save file
  73. End Sub
  74.  
  75. 'Called when the Plugin is about to be removed from memory
  76. Sub Plugin_Terminate
  77.  'Call FileSetAttribute(sF,"H+")
  78. End Sub
  79.  
  80.